type msgType = 'success' | 'warning' | 'info' | 'error'

export const message = (msg: string, type: msgType = 'success') => {
  ElMessage({
    message: msg,
    type: type,
    duration: 2000
  })
}

export const alertMessage = (
  msg: string,
  title: string = '提示',
  options: any = {}
) => {
  ElMessageBox.alert(msg, title, {
    ...options
  })
}
